/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.telsoft.security.business;

import com.telsoft.security.data.SEC_DATA_UG;
import com.telsoft.security.data.SEC_DATA_USER_GROUP;
import com.telsoft.security.entity.SEC_ETT_Group;
import com.telsoft.security.entity.SEC_ETT_UserGroup;
import java.util.List;

/**
 *
 * @author nguyenthang
 */
public class SEC_BU_USER_GROUP {

    public static SEC_ETT_Group getGroupByUserID(int USER_ID) {
        SEC_DATA_USER_GROUP DA = new SEC_DATA_USER_GROUP();
        return DA.getGroupByUserID(USER_ID);
    }
    public static List<SEC_ETT_UserGroup> getAllUG(){
        SEC_DATA_UG DA = new SEC_DATA_UG();
        return DA.getAllUG();
    }
    public static void addUserGroup(int userID, int GroupID){
        SEC_DATA_USER_GROUP DA = new SEC_DATA_USER_GROUP();
        DA.addUserGroup(userID, GroupID);
    }
    public static void updateUserGroup(int userID, int GroupID){
        SEC_DATA_USER_GROUP DA = new SEC_DATA_USER_GROUP();
        DA.updateUserGroup(userID, GroupID);
    }
    public static void deleteUGByUserID(int UserID){
        SEC_DATA_USER_GROUP DA = new SEC_DATA_USER_GROUP();
        DA.deleteUserGroupByUserID(UserID);
    }
}
